module.exports = function(path,data,method){
  return new Promise((resolve,reject)=>{
    wx.request({
      url: 'http://127.0.0.1:8081/api/' + path,
      data: data,
      method: method,
      header: {
        'content-type': 'application/json' // 默认值
      },
      success: resolve,
      fail: function(){
        reject()
      }
    })
  })
}